﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using IService;
using Service;
using Model;

namespace HouseKeeping.View
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["loginBtn"] != null)
            {
                MemberModel model = new MemberModel();
                model.LoginName = Request["loginName"];
                model.password = Request["pwd"];
                model.Phone = Request["phone"];
                model.Sex =Convert.ToInt32(Request["sex"]);
                model.Permission = Convert.ToInt32(Request["permission"]);
                model.MemberName = Request["trueName"];
                model.IsLock = false;
                model.Address = Request["address"];
                model.Email = Request["Email"];
                model.Skey = DateTime.Now.ToString("ddhhmmss");
                ICheckService a = new CheckService();
                bool result = a.InsertLogin(model);
                if (result == true)
                {
                    Response.Write("填写成功");
                }
                else { 
                    Response.Write("填写失败"); 
                }
            }
        }
    }
}